package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerGameGetRoomPlatformSummaryResponse extends BaseQLResponse
{
    /// <summary>
    /// 捕鱼游戏台子概览列表
    /// </summary>
    public List<ButlerGameRoomPlatformSummary> SummaryList;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj.getJSONObject("error_response");
        if (t != null && !t.isNullObject())
        {
            ErrCode = t.getString("code");
            ErrMsg = t.getString("msg");
        }
        else
        {
            t = jsonObj.getJSONObject("butler_game_get_room_platform_summary_response");
            SummaryList = new ArrayList<ButlerGameRoomPlatformSummary>();
            JSONArray arrSummaryList = t.getJSONObject("summary_list").getJSONArray("butler_game_room_platform_summary");
            for (int i = 0; i < arrSummaryList.size(); ++i)
            {
                ButlerGameRoomPlatformSummary o = new ButlerGameRoomPlatformSummary();
                o.DeserializeFromJson(arrSummaryList.getJSONObject(i));
                SummaryList.add(o);
            }
        }
    }
}
